<?php


class template_step_setting extends theme
{

	public function middle()
	{
		$error_num = $this->get("error_num");
		$error_msg = $this->get("error_msg");

		$config = bone::get_config('db');
		
		if($error_num)
		{
		?>
		<div class="error">
			无法连接到数据库(错误编号 <?php echo $error_num; ?>: <?php echo $error_msg; ?>)，请重新配置.
		</div>
		<?php
		}
		?>
<script type="text/javascript" language="javascript"> gotoStep(1);</script>
		
		
<form method="post">
<div class="init-form">
	<div><label>数据库IP:</label><input type="text" name="db_host" size="50" value="<?php echo $config->db_host; ?>" /></div>
	<div><label>数据库用户名:</label><input type="text" name="db_user" size="50" value="<?php echo $config->db_user; ?>" /></div>
	<div><label>数据库密码:</label><input type="text" name="db_pass" size="50" value="<?php echo $config->db_pass; ?>" /></div>
	<div><label>数据库名:</label><input type="text" name="db_name" size="50" value="<?php echo $config->db_name; ?>" /></div>
	<div><label>&nbsp;</label><input type="submit" class="button" value="下一步" /> </div>
</div>
<input type="hidden" name="action" value="1" />
</form>
		<?php
		
	}	

}
?>